Skip to content

refactor: separate PYAUTOFIT_TEST_MODE into distinct PYAUTO_* env vars#1195

Merged
Jammy2211 merged 1 commit intomainfrom
feature/test-mode-separate
Apr 12, 2026
Merged

refactor: separate PYAUTOFIT_TEST_MODE into distinct PYAUTO_* env vars#1195
Jammy2211 merged 1 commit intomainfrom
feature/test-mode-separate

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Update all PYAUTOFIT_TEST_MODE call sites to use the new purpose-specific functions from autoconf.test_mode. Visualization → skip_visualization(), fit I/O → skip_fit_output(), weight thresholds → skip_checks(). Sampler-related sites keep using test_mode_level() / is_test_mode() unchanged.

Depends on: PyAutoLabs/PyAutoConf#86

API Changes

None — internal changes only. The autofit.non_linear.test_mode re-export module now includes 3 additional symbols (skip_fit_output, skip_visualization, skip_checks).

Test Plan

  • All 1205 PyAutoFit tests pass
  • test_initializer.py updated to use PYAUTO_TEST_MODE
Full API Changes (for automation & release notes)

Added (re-exports)

  • autofit.non_linear.test_mode.skip_fit_output
  • autofit.non_linear.test_mode.skip_visualization
  • autofit.non_linear.test_mode.skip_checks

Changed Behaviour

  • Visualizer.should_visualize() now checks PYAUTO_SKIP_VISUALIZATION instead of PYAUTOFIT_TEST_MODE
  • Pre/post-fit output now checks PYAUTO_SKIP_FIT_OUTPUT instead of test_mode_level() >= 2
  • print_vram_use() now checks PYAUTO_SKIP_FIT_OUTPUT instead of test_mode_level() >= 2
  • check_likelihood_function() now checks PYAUTO_SKIP_FIT_OUTPUT instead of is_test_mode()
  • result_info_from() now checks PYAUTO_SKIP_FIT_OUTPUT instead of test_mode_level() >= 2
  • samples_that_exceed_weight_threshold() now checks PYAUTO_SKIP_CHECKS instead of is_test_mode()
  • skip_in_test_mode decorator now checks PYAUTO_SKIP_VISUALIZATION instead of is_test_mode()

Migration

  • Before: export PYAUTOFIT_TEST_MODE=2 controlled everything
  • After: Set each independently: PYAUTO_TEST_MODE=2 PYAUTO_SKIP_FIT_OUTPUT=1 PYAUTO_SKIP_VISUALIZATION=1 PYAUTO_SKIP_CHECKS=1

🤖 Generated with Claude Code

Split the catch-all PYAUTOFIT_TEST_MODE into purpose-specific variables:
- PYAUTO_TEST_MODE (sampler speedup, levels 0-3)
- PYAUTO_SKIP_FIT_OUTPUT (pre/post-fit I/O, VRAM, result text)
- PYAUTO_SKIP_VISUALIZATION (fit visualization and plotting)
- PYAUTO_SKIP_CHECKS (mesh validation, position resampling, weight thresholds)

Also renames:
- PYAUTOARRAY_OUTPUT_MODE -> PYAUTO_OUTPUT_MODE
- PYAUTO_WORKSPACE_SMALL_DATASETS -> PYAUTO_SMALL_DATASETS

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Jammy2211
Copy link
Copy Markdown
Collaborator Author

Workspace PR: PyAutoLabs/autofit_workspace#29

@Jammy2211 Jammy2211 merged commit e2a49f7 into main Apr 12, 2026
1 check passed
@Jammy2211 Jammy2211 deleted the feature/test-mode-separate branch April 12, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant